/**
 * ____________________ *
 *  ____ ____ ____ _  _ *
 *  |___ [__] |--< |\/| *
 * ____________________ *
 *
 * THE CORM PROJECT
 *
 * This file may only be used in accordance with the
 * terms of the Academic Free License ("AFL") v. 3.0,
 * as published by the Open Software Initiative.  A
 * copy of this license is provided in this source
 * release, and may be viewed online at:
 *
 * (http://www.opensource.org/licenses/afl-3.0.php)
 */
package org.eremite.corm.party;

import org.eremite.corm.BaseArchetype;

import javax.persistence.*;
import java.util.Date;

@Entity
public class PartySignature
        extends BaseArchetype {

    @OneToOne(cascade = {
            CascadeType.PERSIST,
            CascadeType.MERGE})
    private Party party;
    
    private Date timeStamp = new Date();
    private String reason = "";

    public PartySignature() {}

    public PartySignature(Party party, String reason) {
        setParty(party);
        setTimeStamp(new Date());
        setReason(reason);
    }

    public Party getParty() {
        return party;
    }

    public void setParty(Party party) {
        this.party = party;
    }

    public Date getTimeStamp() {
        return timeStamp;
    }

    public void setTimeStamp(Date timeStamp) {
        this.timeStamp = timeStamp;
    }

    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason;
    }
}